package br.com.fogas.database.entidade;

import java.io.Serializable;

import br.com.fogas.database.IMetadata;
import br.com.fogas.webservice.parser.condicoes.T_Cond_Pgto_Item;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName=IMetadata.ICondicaoPagto.table_name)
public class CondicaoPagto implements IMetadata, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@DatabaseField(generatedId = true, columnName=ICondicaoPagto.id)
	private Integer id;
	
	@DatabaseField(unique=true, canBeNull=false, width=4, columnName=ICondicaoPagto.tx_cod)
	private String tx_cod;
	
	@DatabaseField(width=4, columnName=ICondicaoPagto.nb_dias)
	private String nb_dias;
	
	@DatabaseField(width=50, columnName=ICondicaoPagto.tx_desc)
	private String tx_desc;
	
	public CondicaoPagto() {
		// TODO Auto-generated constructor stub
	}
	
	public CondicaoPagto(T_Cond_Pgto_Item item) {
		setNb_dias(item.getZTAG1());
		setTx_cod(item.getZTERM());
		setTx_desc(item.getTEXT1());
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTx_cod() {
		return tx_cod;
	}

	public void setTx_cod(String tx_cod) {
		this.tx_cod = tx_cod;
	}

	public String getNb_dias() {
		return nb_dias;
	}

	public void setNb_dias(String nb_dias) {
		this.nb_dias = nb_dias;
	}

	public String getTx_desc() {
		return tx_desc;
	}

	public void setTx_desc(String tx_desc) {
		this.tx_desc = tx_desc;
	}
}
